package birdsong.comm.implemented;

import java.io.Serializable;

import birdsong.comm.ClientSideMessage.Type;

public class ServerSideMessage implements birdsong.comm.ServerSideMessage , Serializable{


	private String payload;
	private String nickName;

	private birdsong.comm.ServerSideMessage.Type type;



	public ServerSideMessage(String payload, String nickName, Type type) {
		super();
		this.payload = payload;
		this.nickName = nickName;
		this.type = type;
	}

	@Override
	public Type getType() {
		return type;
	}

	@Override
	public String getPayload() {
		return payload;
	}

	@Override
	public String getClientNickname() {
		return nickName;
	}


	public String toString(){
		return "["+this.getClass().getSimpleName()+"][NickName]:"+nickName +"<...>[Payload]:"+payload+"<...>[Type]:"+type;

	}
}
